<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 定义一个可以传参的函数
        function fnAdd(iNum1, iNum2) {
            var iRs = iNum1 + iNum2;
            alert(iRs);
            return iRs
        }

        // 调用传参函数
        var iRs2 = fnAdd(10, 5);
        alert(iRs2)
    </script>
</head>
<body>
    
</body>
</html>